package week9;

public class Fish extends Animal{
    private double weight;
    public Fish(int age,double weight){
        super(age);
        this.weight = weight;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }
    @Override
    public void info(){
        System.out.println("我是一只"+weight+"斤重的鱼！");
        super.info();
    }
}
